<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<script src="html5rush.binding.js"></script>
		<title>test</title>
		<script type="text/javascript">
			function init(){
				var canvas=new Canvas();
				var testDrag=new XY().x(50).y(300);
				canvas.attach("workCanvas")					
					.child(new SolidRectangle().x(20).y(0).width(100).height(60).fill("#33ff00"))
					.child(new Glyph().text("Test glyph").font("Bold Italic 47px Serif"))	
					.child(new Polyline().color("#ff6600").width(9)
						.point(testDrag)
						.point(123,83)
						.point(223,323)
						.point(43,423)
						.point(testDrag)
						)
					.child(new Polyline().color("#3366ff").width(2)
						.point(123,123)
						.point(123,283)
						.point(323,523)
						.point(413,323)
						.point(123,123)
						)
					.child(new Polyline().color("#ff00ff").width(5)
						.point(500,500)
						.point(500,400)
						.point(400,450)
						.point(450,450)
						.point(500,500)
						)
					.child(new Clicker().click(function(){alert("click");}).x(100).y(100).width(100).height(100))
					.child(new Dragger().x(testDrag.x()).y(testDrag.y()).width(50).height(50))
					.delay(30).startRenderLoop();
				var str="a/a-10";
				var a=new Amount().value(100);
				var b=new Amount().bind(a.minus(10));
				str=str+"\n"+a.value()+"/"+b.value();
				b.value(500);
				str=str+"\n"+a.value()+"/"+b.value();
				b.value(19);
				str=str+"\n"+a.value()+"/"+b.value();
				alert(str);
				}				
		</script>
	</head>
	<body onload="init()">
		<canvas id="workCanvas" width="1200" height="800" >0</canvas>
		<img id="runner" src="vk.jpg" style="display:none" />
	</body>
</html>

